﻿<%@ Page Language="C#" MasterPageFile="~/TownshipEnterprise/Town.master" AutoEventWireup="true" StylesheetTheme="Content" CodeFile="DeviceAdd.aspx.cs" Inherits="TownshipEnterprise_DeviceAdd" Title="无标题页" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <%--<ajaxToolkit:CascadingDropDown ID="CascadingDropDown_Department" runat="server" Category="Department"
        LoadingText="[加载...]" PromptText="" ServiceMethod="GetDepartments" ServicePath="../Services/DepartmentService.asmx"
        TargetControlID="DepartmentList" Enabled="True">
    </ajaxToolkit:CascadingDropDown>
    <ajaxToolkit:CascadingDropDown ID="CascadingDropDown_Unit" runat="server" Category="Unit"
        LoadingText="[加载...]" ParentControlID="DepartmentList" PromptText="" ServiceMethod="GetUnits"
        ServicePath="../Services/DepartmentService.asmx" 
        TargetControlID="UnitList">
    </ajaxToolkit:CascadingDropDown>--%>
    <ajaxToolkit:CalendarExtender ID="CalendarExtender_DatePurchase" TargetControlID="DatePurchase"
        Animated="false" runat="server" Format="yyyy-MM-dd">
    </ajaxToolkit:CalendarExtender>
    <ajaxToolkit:CalendarExtender ID="CalendarExtender_DateUse" TargetControlID="DateUse"
        Animated="false" runat="server" Format="yyyy-MM-dd">
    </ajaxToolkit:CalendarExtender>
    <ajaxToolkit:CalendarExtender ID="CalendarExtender_Product" TargetControlID="DateProduct"
        Animated="false" runat="server" Format="yyyy-MM-dd">
    </ajaxToolkit:CalendarExtender>

    <table cellspacing="0" cellpadding="0" width="100%" class="intable">
        <caption>
            <asp:Label ID="ActionTitle" runat="server"></asp:Label></caption>
        <tr>
            <td class="title" style="width: 120px">
                所属地区：
            </td>
            <td>
               <%-- <asp:UpdatePanel runat="server" ID="UpdatePanel1">
                    <ContentTemplate>--%><asp:DropDownList ID="DepartmentList" runat="server" 
                    AutoPostBack="True" DataTextField="AliasName"
                            DataValueField="DepartmentID" OnTextChanged="DepartmentList_TextChanged" 
                            Width="30%" Height="22px">
                        </asp:DropDownList>
                        <asp:DropDownList ID="UnitList" runat="server" 
                    DataTextField="shortname" DataValueField="DepartmentID"
                            Width="30%" AutoPostBack="True" Height="22px" 
                            onselectedindexchanged="UnitList_SelectedIndexChanged">
                        </asp:DropDownList>
                        <%--   <span class="comment">车辆所属单位名称</span>--%>
                        <%--   </ContentTemplate>
                </asp:UpdatePanel>--%>
            </td>
        </tr>
        <tr>
            <td class="title" style="width: 120px">
                队伍名称：</td>
            <td>
                        <asp:DropDownList ID="ddlTownBasic" runat="server" DataTextField="Army" 
                            DataValueField="ID" Height="22px" Width="60%">
                        </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="title">
                装备类别：
            </td>
            <td>
                <asp:UpdatePanel runat="server" ID="upl2">
                    <ContentTemplate>
                        <asp:DropDownList ID="DeviceTypeList" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DeviceTypeList_SelectedIndexChanged"
                            Width="20%">
                        </asp:DropDownList>
                        <asp:DropDownList ID="DeviceClassList" runat="server" Width="40%" Height="22px">
                        </asp:DropDownList>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
        </tr>
        <tr>
            <td class="title">
                装备名称：
            </td>
            <td>
                <asp:TextBox ID="DeviceName" runat="server" Width="375px" Height="22px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="title">
                装备型号：
            </td>
            <td>
                <asp:TextBox ID="DeviceModel" runat="server" Width="375px" Height="22px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="title">
                装备数量：
            </td>
            <td>
                <asp:TextBox ID="DeviceCount" runat="server" Width="120px"></asp:TextBox>
                <asp:DropDownList ID="UnitNameList" runat="server">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="title">
                性能参数：
            </td>
            <td>
                <asp:TextBox ID="Parameters" runat="server" Width="375px" Height="22px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="title">
                购入价格：
            </td>
            <td>
                <asp:TextBox ID="Price" runat="server" Width="120px"></asp:TextBox>
                (人民币：元)
            </td>
        </tr>
        <tr>
            <td class="title">
                购入日期：
            </td>
            <td>
                <asp:TextBox ID="DatePurchase" runat="server" Width="120px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="DatePurchase" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="title">
                使用日期：
            </td>
            <td>
                <asp:TextBox ID="DateUse" runat="server" Width="120px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="DateUse" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="title">
                出厂日期：
            </td>
            <td>
                <asp:TextBox ID="DateProduct" runat="server" Width="120px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="DateProduct" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="title">
                生产厂家：
            </td>
            <td>
                <asp:TextBox ID="Manufacturer" runat="server" Width="375px" Height="22px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="title">
                装备状态：
            </td>
            <td>
                <asp:DropDownList ID="StateList" runat="server">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="title">
                装备图片：
            </td>
            <td>
                <asp:FileUpload ID="WordFile" runat="server" Height="22px" Width="375px" />
            </td>
        </tr>
        <tr>
            <td class="title">
            </td>
            <td>
                <asp:Button ID="ButtonSave" runat="server" OnClick="ButtonSave_Click" Text="保存" />
                <input id="ButtonCancel" class="button_default" type="button" value="取消" onclick="window.location='DeviceList.aspx';" />
            </td>
        </tr>
        <tr>
            <td class="title">
            </td>
            <td>
                <asp:Label ID="Prompt" runat="server" />
            </td>
        </tr><tr>
            <td class="title">
            </td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>
